package com.wwtech.epp.ui.adapter.work;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.wwtech.epp.R;
import com.wwtech.epp.entity.AllNode;

import java.util.List;

/**
 * Created by hu on 2017/10/24.
 */

public class FrameworkAdapter extends BaseQuickAdapter<AllNode.DataBean, BaseViewHolder> {

    public FrameworkAdapter(@Nullable List<AllNode.DataBean> data) {
        super(R.layout.item_framework, data);
    }

    @Override
    protected void convert(BaseViewHolder baseViewHolder, AllNode.DataBean dataBean) {
        baseViewHolder.setText(R.id.name, dataBean.getName() + "(" + dataBean.getMemberCnt() + ")");
        if (baseViewHolder.getLayoutPosition() == 0) {
            baseViewHolder.setVisible(R.id.view, false);
        } else {
            baseViewHolder.setVisible(R.id.view, true);
        }
    }
}
